package cg.studio.algorithm.tree;


public class BinaryTree<T> implements Tree
{
  private String name;
  private T value;
  private BinaryTree<T> left;
  private BinaryTree<T> right;
  
  public BinaryTree( String name, T value )
  {
    setName( name );
    setValue( value );
  }
  
  
  public void display()
  {
    System.out.print( name + ", " );
  }
  
  
  
  public String getName()
  {
    return name;
  }

  public void setName( String name )
  {
    this.name = name;
  }

  public T getValue()
  {
    return value;
  }
  public void setValue( T value )
  {
    this.value = value;
  }
  public BinaryTree< T > getLeft()
  {
    return left;
  }
  public void setLeft( BinaryTree< T > left )
  {
    this.left = left;
  }
  public BinaryTree< T > getRight()
  {
    return right;
  }
  public void setRight( BinaryTree< T > right )
  {
    this.right = right;
  }
  
  
}
